//
//  WaterfallLayout.h
//  TTLayoutDemo
//
//  Created by 余意 on 2016/12/13.
//  Copyright © 2016年 赵春浩. All rights reserved.
//

#import <UIKit/UIKit.h>

typedef CGFloat(^HeightBlock)(NSIndexPath * indexPath,CGFloat width);

@interface WaterfallLayout : UICollectionViewLayout

@property (nonatomic,copy) HeightBlock heightblock;


@property (nonatomic,assign) NSInteger lineNum;

@property (nonatomic,assign) CGFloat  rowSpace;

@property (nonatomic,assign) CGFloat lineSpace;

@property (nonatomic,assign) UIEdgeInsets sectionInset;

- (void)computeIndexCellHeightWithWidthBlock:(CGFloat(^)(NSIndexPath *indexPath , CGFloat width))block;


#pragma mark - 存放每列的高度
@property (nonatomic,strong) NSMutableDictionary * heightDic;

#pragma mark - 存放多有item的attrubutes属性
@property (nonatomic,strong) NSMutableArray * array;


@end
